﻿@model IEnumerable<KRM.Core.vWebViewReplacement>
@{
    ViewBag.Title = "Replacements";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="container-fluid">
    <fieldset>
        <legend>Search</legend>
        <form action="/rdm/replacements" class="row-fluid">
            <div class="span1">Order Ref</div>
            <div class="span2">
                <input type="text" name="orderref" class="input-block-level" value="@(Request["orderref"] ?? "")"/>
            </div>
            <div class="span1">Postcode</div>
            <div class="span2">
                <input type="text" name="postcode" class="input-block-level" value="@(Request["postcode"] ?? "")"/>
            </div>
            <div class="span2 text-right">Filter by status</div>
            <div class="span3">
                @Html.DropDownList("StatusId", null, new { @class = "input-block-level" })
            </div>
            <div class="span1">
                <input type="submit" class="btn btn-primary" value="Search" /></div>
        </form>
    </fieldset>
    <p>
        <input type="checkbox" disabled="disabled" checked="checked" style="float: left; margin-right: 10px;" />
        Restrict to top 100</p>
    <div class="rdm-scroll">
        <table class="table table-bordered table-fix tbl-selected krmtable" data-height="200">
            <thead>
                <tr>
                    <th>RDM OrderRef</th>
                    <th>Customer</th>
                    <th>Postcode</th>
                    <th>Order Item</th>
                    <th>Replacement Items</th>
                    <th>Date Placed</th>
                    <th>Order Date</th>
                </tr>
            </thead>
            <tbody>
                @foreach (var item in Model.Take(100))
                {
                    <tr style="cursor: pointer; @(item.Urgent == true ? "color:red;" : "") @(item.ReplacementActionID == 8 ? "color:green;" : "")" onclick="replacementselected('@item.DisputeID')">
                        <td>@item.RDMOrderRef</td>
                        <td>@item.Customer</td>
                        <td>@item.Postcode</td>
                        <td>@item.OrderItem</td>
                        <td>@item.ReplacementItems</td>
                        <td>@item.DatePlaced</td>
                        <td>@item.OrderDate</td>
                    </tr>
                }
            </tbody>
        </table>

    </div>
    <form action="/rdm/savecollection" method="POST" class="margin0 fr-replacementdetail">
        <div class="row-fluid">
            <div class="span5">
                <fieldset>
                    <legend>Customer Details</legend>
                    <div class="row-fluid">
                        <div class="span4">Name</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" />
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Address</div>
                        <div class="span8">
                            <textarea class="input-block-level"></textarea>
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Order Items</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" />
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Postcode</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" />
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Telephone</div>
                        <div class="span8">
                            <textarea class="input-block-level"></textarea>
                        </div>
                    </div>
                </fieldset>
                <fieldset>
                <legend>Collection Details</legend>
                <div class="row-fluid">
                    <div class="span4">Collection Items</div>
                    <div class="span8">
                        <input type="text" class="input-block-level" />
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span4">Number of Parcels</div>
                    <div class="span8">
                        <input type="text" class="input-block-level" />
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span4">Collection Number</div>
                    <div class="span8">
                        <input type="text" class="input-block-level" />
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span4">Collection Date</div>
                    <div class="span8">
                        <input type="text" class="input-block-level" />
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span4">Collection Courier</div>
                    <div class="span8">
                        <input type="text" class="input-block-level" />
                    </div>
                </div>
            </fieldset>
            </div>
            
            <div class="span7">
                <div class="border-padding10">
                    <div class="row-fluid">
                        <div class="span4">Email</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" />
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Order Reference</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" />
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Order Item</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" />
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">RDM Items</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" />
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">RDM Number</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" />
                        </div>
                    </div>
                </div>
                <fieldset>
                    <legend>Replacement Details</legend>
                    <div class="row-fluid">
                        <div class="span4">Replacement Items</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" />
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Number of Parcels</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" />
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Replacement Date</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" />
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Courier</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" />
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Action</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" />
                        </div>
                    </div>
                    <div class="row-fluid">
                        <div class="span4">Futher Details</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" />
                        </div>
                    </div>
                </fieldset>
            </div>
        </div>
    </form>
</div>
